package com.spt.springbootzhsx.entity.back;

import com.spt.springbootzhsx.entity.data.FloatData;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class MovieBack implements Comparable{
    private Integer mid;
    private String mrole;
    private String director;
    private String desn;
    private String pic;
    private String mtype;
    private Float rate;
    private Integer duration;
    private String mlanguage;
    private String mname;
    private String mstate;
    private String nickname;
    private String mcount;
    private Float suggest;

    @Override
    public int compareTo(Object o) {
        if(o instanceof MovieBack){
            if(this.getSuggest()<((MovieBack) o).getSuggest())return 1;
            else if(this.getSuggest()>((MovieBack) o).getSuggest())return -1;
            else return 0;
        }
        throw new RuntimeException("对象错误异常");
    }
}
